package com.looeyWei;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class sonWin extends JDialog{
    private JButton button1;
    public JPanel panel1;
    private JTextField textField1;
    private JTextField textField2;

    public sonWin(Frame owner, boolean modal) {
        super(owner, modal);

        button1.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                System.out.println("点击鼠标");
            }
        });
        this.setSize(400, 300);
        this.setContentPane(panel1);
        this.setLocationRelativeTo(null);

//        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//        this.pack();
        this.setTitle("子窗口");
        this.setVisible(true);
    }
}
